package com.tianlan.blog.entity;

import java.time.LocalDateTime;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value="Content对象", description="文章表")
@Entity
@Table(name ="content")
@EntityListeners(AuditingEntityListener.class)
@DynamicInsert(true)
@DynamicUpdate(true)
public class Content {
	
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    
    @Column(name = "user_id")
    private Integer userId;

    @Column(name = "content_title")
    private String contentTitle;
    
    @Column(name = "content_url")
    private String contentUrl;
    
    @Column(name = "content_details")
    private String contentDetails;

    @Column(name = "content_keyword")
    private String contentKeyword;
    
    @Column(name = "content_description")
    private String contentDescription;
    
    @Column(name = "content_img")
    private String contentImg;
    
    @Column(name = "content_datetime")
    private Date contentDatetime;
    
    @Column(name = "content_source")
    private String contentSource;
    
    @Column(name = "content_author")
    private String contentAuthor;
    
    @Column(name = "content_display")
    private String contentDisplay;
    
    @Column(name = "content_type")
    private String contentType;
    
    @Column(name = "content_hit")
    private Integer contentHit;
    
    @Column(name = "content_sort")
    private Integer contentSort;
    
    @Column(name = "create_time")
    @CreatedDate
    private LocalDateTime createTime;

    @Column(name = "creator")
    @CreatedBy
    private Integer creator;

    @Column(name = "update_time")
    @LastModifiedDate
    private LocalDateTime updateTime;

    @Column(name = "operator")
    @LastModifiedBy
    private Integer operator;

    @ApiModelProperty(value = "1:删除 0:不删除")
    @Column(name = "del_flag")
    private String delFlag;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getContentTitle() {
		return contentTitle;
	}

	public void setContentTitle(String contentTitle) {
		this.contentTitle = contentTitle;
	}

	public String getContentUrl() {
		return contentUrl;
	}

	public void setContentUrl(String contentUrl) {
		this.contentUrl = contentUrl;
	}

	public String getContentDetails() {
		return contentDetails;
	}

	public void setContentDetails(String contentDetails) {
		this.contentDetails = contentDetails;
	}

	public String getContentKeyword() {
		return contentKeyword;
	}

	public void setContentKeyword(String contentKeyword) {
		this.contentKeyword = contentKeyword;
	}

	public String getContentDescription() {
		return contentDescription;
	}

	public void setContentDescription(String contentDescription) {
		this.contentDescription = contentDescription;
	}

	public String getContentImg() {
		return contentImg;
	}

	public void setContentImg(String contentImg) {
		this.contentImg = contentImg;
	}

	public Date getContentDatetime() {
		return contentDatetime;
	}

	public void setContentDatetime(Date contentDatetime) {
		this.contentDatetime = contentDatetime;
	}

	public String getContentSource() {
		return contentSource;
	}

	public void setContentSource(String contentSource) {
		this.contentSource = contentSource;
	}

	public String getContentAuthor() {
		return contentAuthor;
	}

	public void setContentAuthor(String contentAuthor) {
		this.contentAuthor = contentAuthor;
	}

	public String getContentDisplay() {
		return contentDisplay;
	}

	public void setContentDisplay(String contentDisplay) {
		this.contentDisplay = contentDisplay;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public Integer getContentHit() {
		return contentHit;
	}

	public void setContentHit(Integer contentHit) {
		this.contentHit = contentHit;
	}

	public Integer getContentSort() {
		return contentSort;
	}

	public void setContentSort(Integer contentSort) {
		this.contentSort = contentSort;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	public Integer getCreator() {
		return creator;
	}

	public void setCreator(Integer creator) {
		this.creator = creator;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public Integer getOperator() {
		return operator;
	}

	public void setOperator(Integer operator) {
		this.operator = operator;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
    
    
}
